<?php
$host = @$_POST['host'] ;
$username = @$_POST['username'] ;
$password = @$_POST['password'] ;
$databaseName  = @$_POST['databaseName'] ;
$journalid = @$_POST['journalid'] ;
$Year = @$_POST['year'] ;
$idPhieu = @$_POST['idPhieu'] ;
$succ = 1;

$con = mysql_connect($host, $username ,$password);
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db($databaseName, $con);

$mysql = "DELETE FROM CTKT".$journalid. $Year. " WHERE idphieu='". $idPhieu ."'";

$succ = mysql_query($mysql);
if ($succ == false)
{
	$succ  = "0";
	mysql_close($con);
	return;
}

$mysql = "DELETE FROM CTKTDT".$journalid. $Year. " WHERE idphieu='". $idPhieu ."'";
$succ = mysql_query($mysql);
if ($succ == false)
{
	$succ  = "0";
}
echo $succ ;
mysql_close($con);



?> 

